#include <stdio.h>
#include <unistd.h>
#include <string.h>

int main()
{
    FILE*fp=fopen("log.txt","w");
    if(fp==NULL)
    {
        perror("fopen");
        return 1;
    }
    const char *s1 = "hello fwrite \n";
    fwrite(s1,strlen(s1),1,fp);
    const char *s2 = "hello fprintf \n";
    fprintf(fp,"%s",s2);
    const char *s3 = "hello fputs \n";
    fputs(s3,fp);
    
    
    fclose(fp);
    
    //while(1)
    //{
    //    sleep(1);
    //}
    //return 0;
}
